package com.freewater.springboot.demo.ioc.dependson;

import com.freewater.springboot.demo.PackageUtils;
import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
import org.springframework.context.support.GenericApplicationContext;

public class Main {

    public static void main(String[] args) throws InterruptedException {
        GenericApplicationContext applicationContext = new GenericApplicationContext();
        new XmlBeanDefinitionReader(applicationContext).loadBeanDefinitions("classpath:" + PackageUtils.getClassPathFroClass(Main.class) + "/applicationContext.xml");
        applicationContext.refresh();
        Thread.sleep(1000);
        applicationContext.close();
    }
}
